/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 *
 * @author calandreli
 */
import generica.Generica;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "setor")
@SequenceGenerator(name = "setor_seq", sequenceName = "id_setor", allocationSize = 1)
public class Setor implements Generica {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "setor_seq")
    @Column(name = "id_setor")
    private int id_setor;
    @Column(name = "descricao")
    private String descricao;
    @Column(name = "organograma")
    private String organograma;
    @Column(name = "responsavel")
    private String responsavel;
    @Column(name = "sigla")
    private String sigla;

    public int getId_setor() {
        return id_setor;
    }

    public void setId_setor(int id_setor) {
        this.id_setor = id_setor;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public String getOrganograma() {
        return organograma;
    }

    public void setOrganograma(String organograma) {
        this.organograma = organograma;
    }

    public String getResponsavel() {
        return responsavel;
    }

    public void setResponsavel(String responsavel) {
        this.responsavel = responsavel;
    }

    public String getSigla() {
        return sigla;
    }

    public void setSigla(String sigla) {
        this.sigla = sigla;
    }

    @Override
    public Serializable getIdentificador() {
        return this.id_setor;
    }

    @Override
    public String toString() {
        return  (sigla+" - "+organograma);
    }

}
